package com.laozhao.deliveryManager.view.master;


import com.laozhao.deliveryManager.zgui.ZPanel;
import java.awt.BorderLayout;
import javax.swing.JPanel;
import java.awt.FlowLayout;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JButton;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import java.awt.GridLayout;
import javax.swing.SwingConstants;
import javax.swing.border.LineBorder;
import java.awt.Color;

public class GoodsPanel extends ZPanel {
	private JTextField searchField;
	private JTable table;
	private JTextField textField_1;
	private JTextField textField_2;
	private JTextField textField_3;
	private JTextField textField_4;
	private JTextField textField_5;

	/**
	 * Create the panel.
	 */
	public GoodsPanel() {
		setLayout(new BorderLayout(0, 0));
		
		JPanel searchPanel = new JPanel();
		searchPanel.setBorder(new LineBorder(new Color(0, 0, 0)));
		add(searchPanel, BorderLayout.NORTH);
		searchPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));
		
		searchField = new JTextField();
		searchPanel.add(searchField);
		searchField.setColumns(10);
		
		JButton button = new JButton("检索");
		searchPanel.add(button);
		
		JScrollPane scrollPane = new JScrollPane();
		add(scrollPane, BorderLayout.CENTER);
		
		table = new JTable();
		scrollPane.setViewportView(table);
		
		JPanel panel_1 = new JPanel();
		add(panel_1, BorderLayout.EAST);
		panel_1.setLayout(new BorderLayout(0, 0));
		
		JPanel panel = new JPanel();
		panel_1.add(panel, BorderLayout.NORTH);
		panel.setLayout(new GridLayout(5, 2, 5, 2));
		
		JLabel label = new JLabel("编码");
		label.setHorizontalAlignment(SwingConstants.RIGHT);
		panel.add(label);
		
		textField_1 = new JTextField();
		panel.add(textField_1);
		textField_1.setColumns(8);
		
		JLabel label_1 = new JLabel("名称");
		label_1.setHorizontalAlignment(SwingConstants.RIGHT);
		panel.add(label_1);
		
		textField_2 = new JTextField();
		panel.add(textField_2);
		textField_2.setColumns(8);
		
		JLabel label_2 = new JLabel("型号");
		label_2.setHorizontalAlignment(SwingConstants.RIGHT);
		panel.add(label_2);
		
		textField_3 = new JTextField();
		panel.add(textField_3);
		textField_3.setColumns(8);
		
		JLabel label_3 = new JLabel("单位");
		label_3.setHorizontalAlignment(SwingConstants.RIGHT);
		panel.add(label_3);
		
		textField_4 = new JTextField();
		panel.add(textField_4);
		textField_4.setColumns(8);
		
		JLabel label_4 = new JLabel("价格");
		label_4.setHorizontalAlignment(SwingConstants.RIGHT);
		panel.add(label_4);
		
		textField_5 = new JTextField();
		panel.add(textField_5);
		textField_5.setColumns(8);
		
		JPanel panel_2 = new JPanel();
		panel_1.add(panel_2, BorderLayout.CENTER);
		panel_2.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		
		JButton button_2 = new JButton("新增");
		panel_2.add(button_2);
		
		JButton button_1 = new JButton("保存");
		panel_2.add(button_1);
		
		JButton button_3 = new JButton("删除");
		panel_2.add(button_3);

	}

}
